const reg = /{{(.*?)}}/g;

export function stateFormat(template, state) {
  let _template = template.replace(reg, (node, key) => {
    console.log(key);
    return state[key];
  });
  return _template;
}
